-
Notifications
You must be signed in to change notification settings - Fork 813
feat(renderers): Add React Native renderer #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(renderers): Add React Native renderer #430
Conversation
Add first React Native implementation of A2UI renderer with: - Core A2UIRenderer component for rendering A2UI specs - 8 MVP components: Text, Button, Image, Row, Column, Card, List, TextField - JSONL stream parser for real-time updates - Message dispatcher for A2UI protocol messages - Surface registry and component buffer for state management - Data binding support with BoundValue resolution - useA2UIStream hook for streaming from agent servers - Full TypeScript support Implements google#428
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
I have signed the CLA. Please re-check. |
Added new components matching Angular renderer: - Modal, Tabs, Checkbox, Slider, DateTimeInput - MultipleChoice, Icon, Divider, Video, AudioPlayer Added theming system with light/dark themes. Added example apps demonstrating all components. Updated README with full documentation.
- Add Jest configuration with ts-jest for TypeScript ESM support - Add JSONL parser tests (basic parsing, chunked input, error handling) - Add data model store tests (type guards, path operations, resolvers) - Add message dispatcher tests (message routing, lifecycle hooks) - Add component buffer tests (CRUD ops, tree traversal, search) - Add surface registry tests (surface lifecycle, subscriptions) - Update ESLint config to recognize Jest test environment - 130 tests covering all core modules
|
Nice work @sivamrudram-eng @ataibarkai is leading the effort for an A2UI react renderer. Atai and CopilotKit team, can you please review this PR and see what you might want for the official implementation? Regardless of the outcome (because I think Atai and team are kind of far into their work) we would welcome your future contributions and refinements to make the A2UI react renderer better. We also have a v0.9 spec ~done and there will be improvements to each of these renderers to support v0.9, possibly backwards compatibility, certainly better decoupling of transport and shared library functions... lots more stuff to do :) |
Summary
This PR adds the first React Native implementation of the A2UI renderer, enabling A2UI-compliant agents to generate native mobile UIs on iOS and Android.
Features
Core Components
MVP Components (8 of 16)
<Text><Pressable><Image><View flexDirection="row"><View><View>with shadow<FlatList><TextInput>Infrastructure
Usage Example
Roadmap
@a2ui/react-nativeImplements #428
Standalone Repository
This renderer is also available as a standalone package at:
https://github.com/sivamrudram-eng/a2ui-react-native